package com.mxpio.erp.common.equipment.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import com.mxpioframework.security.entity.User;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_EQUIPMENT_CALIBRATION_PROGRESS")
@Schema(description="检定操作进度")
public class EquipmentCalibrationProgress  extends BaseEntity {
    /**主键*/
    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "主键")
    private String id;

    /**工单编码*/
    @Column(name = "CAL_CODE_")
    @Schema(description = "工单编码")
    private String calCode;

    /**操作人*/
    @Column(name = "REPORTER_")
    @Schema(description = "上报人")
    @Dict(dicEntity = User.class, dicText = "nickname", dicCode = "username")//需要字典
    private String reporter;

    @Column(name = "EXECUTION_STATUS_")
    @Schema(description = "状态")
    @Dict(dicCode = "MB_ERP_EQUIPMENT_CALIBRATION_STATUS")
    private String executionStatus;

    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Column(name = "REPORT_TIME_")
    @Schema(description = "上报时间")
    private java.util.Date reportTime;

    @Column(name = "CONTENT_",columnDefinition = "TEXT")
    @Schema(description = "内容")
    private String content;
}
